package com.auntie.stream.ffmpeg;

import org.bytedeco.ffmpeg.global.avcodec;
import org.springframework.boot.context.properties.ConfigurationProperties;

@ConfigurationProperties(
        prefix = "video.stream.ffmpeg"
)
public class FFMPEGConfiguration {
    private String format = "flv";
    private double frameRate = 30d;
    private double videoBitrate =400000d;
    private int audioChannels = 1;
    private int videoCodec = avcodec.AV_CODEC_ID_H264;
    private Image image;

    public Image getImage() {
        return image;
    }

    public void setImage(Image image) {
        this.image = image;
    }

    public String getFormat() {
        return format;
    }

    public void setFormat(String format) {
        this.format = format;
    }

    public double getFrameRate() {
        return frameRate;
    }

    public void setFrameRate(double frameRate) {
        this.frameRate = frameRate;
    }

    public double getVideoBitrate() {
        return videoBitrate;
    }

    public void setVideoBitrate(double videoBitrate) {
        this.videoBitrate = videoBitrate;
    }

    public int getAudioChannels() {
        return audioChannels;
    }

    public void setAudioChannels(int audioChannels) {
        this.audioChannels = audioChannels;
    }

    public int getVideoCodec() {
        return videoCodec;
    }

    public void setVideoCodec(int videoCodec) {
        this.videoCodec = videoCodec;
    }

    public static class Image {
        private int imageWidth = 1080;
        private int imageHeight = 1440;

        public int getImageWidth() {
            return imageWidth;
        }

        public void setImageWidth(int imageWidth) {
            this.imageWidth = imageWidth;
        }

        public int getImageHeight() {
            return imageHeight;
        }

        public void setImageHeight(int imageHeight) {
            this.imageHeight = imageHeight;
        }
    }

}
